﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	EditNews
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  <link href="../../Content/Admin/control.css" rel="stylesheet" type="text/css" />
    <link href="http://localhost:2660/Content/template.css" rel="stylesheet" type="text/css" />
    <link href="http://localhost:2660/Content/validationEngine.jquery.css" rel="stylesheet"
        type="text/css" />
    <script src="http://localhost:2660/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="http://localhost:2660/Scripts/jquery.validationEngine-vi.js" type="text/javascript"></script>
    <script src="http://localhost:2660/Scripts/jquery.validationEngine.js" type="text/javascript"></script>
    <script src="http://localhost:2660/Content/ckeditor/ckeditor.js" type="text/javascript"></script>
    <script>
        $(document).ready(function () {
            $("#formID").validationEngine();
        });
    </script>
     <script type="text/javascript">
         var editor;
         function taoeditor(languagecode, id) {
             var editor = CKEDITOR.replace(id, { language: languagecode });
         }
         $(function () { taoeditor('vi', 'noidung') });
         </script>
    <form method="post" action="/Cate/EditCate" id="formID">
      <%if (ViewData["listnewsid"] != null)
      { %>
      <table width="100%">
   <%foreach (VgoCardChange.Models.Objects.News news in (List<VgoCardChange.Models.Objects.News>)ViewData["listnewsid"])
     { %>
      
      <tr><td style="width: 68px"> Mã tin</td><td><input value="<%: news.NewsID %>" name="NewsID" readonly="readonly" /></td></tr> 
         <tr> <td style="width: 68px">Tiêu đề tin</td><td><input value="<%: news.NewsName %>" name="NewsName" class="validate[required]"/></td> 
       </tr> 
        <tr> <td style="width: 68px">Nội dung</td><td><%--<input value="<%: news.Content %>" name="Content" class="validate[required]" />--%><textarea id="noidung" name="Content" value="<%: news.Content %>"></textarea></td> </tr>
   <tr> <td style="width: 68px">Ngày đăng</td><td><input value="<%: news.DatePost %>" name="DatePost" /></td> 
       </tr> 
         <tr> <td style="width: 68px">Loại tin</td><td> <%if (ViewData["listcate1"] != null)
                            { %><%:Html.DropDownList("listcate1", "--Chọn tên loại tin--")%><%} %> </td> 
       </tr> 
        <tr> <td style="width: 68px">Người đăng</td><td><%--<%:Html.DropDownList("listuser","--Chọn người đăng--")%>--%><%=Session["UserName"]%></td> 
       </tr>     
       <%-- Mã Quyền: <input value="<%: tv.MaQuyen %>" name="MaQuyen" />--%>
    <%} %>
    </table>
   <%} %>
   <div class="Control">
  <input type="submit" value="Ghi lại" class="vadd" />
  <%:Html.ActionLink("Trở lại", "GetNews", "News", new { @class="vback"})%>
  </div>
  </form>
</asp:Content>
